<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles"%>
	
<style type="text/css">
<!--
.STYLE1 {font-size: 12px}
body {
	margin-top: 0px;
	margin-bottom: 0px;
}
-->
</style>
<strong>课程管理列表页面</strong> → 
<a href="course.do?method=add">增加课程</a>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="30"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="200"></td>
        <td style="padding-right:10px;"><div align="left"></div></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td>
      <table width="500" border="0" align="center" cellpadding="0"
			cellspacing="0">
			<tr>
				<td>&nbsp;</td>
				<td>&nbsp;</td>
			</tr>
	  </table>     
      <table width="700" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#c9c9c9">
      <tr>
        <td width="100" height="22" bgcolor="#FFFFFF"><div align="center"><strong><span class="STYLE1">课程编号</span></strong></div></td>
        <td width="200" bgcolor="#FFFFFF"><div align="center"><strong><span class="STYLE1">课程名称</span></strong></div></td>
        <td width="144" bgcolor="#FFFFFF"><div align="center"><strong><span class="STYLE1">课程类型</span></strong></div></td>
        <td width="144" bgcolor="#FFFFFF"><div align="center"><strong><span class="STYLE1">学 时</span></strong></div></td>
        <td width="144" bgcolor="#FFFFFF"><div align="center"><strong><span class="STYLE1">学 分</span></strong></div></td>
        <td width="144" bgcolor="#FFFFFF"><div align="center"><strong><span class="STYLE1">所属专业</span></strong></div></td>
        <td width="200" bgcolor="#FFFFFF"><div align="center"><strong><span class="STYLE1">所属院系</span></strong></div></td>
        <td width="100" bgcolor="#FFFFFF"><div align="center"><strong><span class="STYLE1">管 理</span></strong></div></td>
      </tr>
      <c:if test="${!empty courseList}">
	  <c:forEach items="${courseList}" var="course">
      <tr>
        <td align="center" bgcolor="#FFFFFF">${course.courseId }</td>
        <td align="center" bgcolor="#FFFFFF">${course.courseName }</td>
        <td align="center" bgcolor="#FFFFFF"><c:choose><c:when test="${course.courseType == 1 }">专业课</c:when><c:when test="${course.courseType == 2 }">公共课</c:when></c:choose></td>
        <td align="center" bgcolor="#FFFFFF">${course.hours }</td>
        <td align="center" bgcolor="#FFFFFF">${course.credit }</td>
        <td align="center" bgcolor="#FFFFFF">${course.major.majorName }</td>
        <td align="center" bgcolor="#FFFFFF">${course.major.dept.deptName }</td>
        <td align="center" bgcolor="#FFFFFF"><a href="course.do?method=update&id=${course.id }">修改</a> <a href="course.do?method=delete&id=${course.id }">删除</a></td>
      </tr>
      </c:forEach>
	  </c:if>
      </table>
    </td>
  </tr>
  <tr>
    <td height="35"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="25%" height="29" nowrap="nowrap">&nbsp;</td>
        <td width="75%" valign="top" class="STYLE1">&nbsp;</td>
      </tr>
    </table></td>
  </tr>
</table>
